<template>
	<view>
		<block v-for="(item,index) in goodsConsultList">
			<view class="list flex flex-direction">
				<view class="item1">
					<view class="flex">
						<view>问</view>
						<text>{{item.question}}</text>
					</view>
				</view>
				<view class="item2">
					<view class="flex">
						<view>答</view>
						<text>{{item.answer}}</text>
					</view>
				</view>
				<view class="noData flex align-center">
					<text class="lg text-gray cuIcon-info"></text>
					<text>平台暂未提供回复额，请耐心等待！</text>
				</view>
			</view>
		</block>
	</view>
</template>

<script>
	var api = require('@/components/api.js');
	export default {
		data() {
			return {
			 user:uni.getStorageSync('user'),
			 goodsConsultList:[]	,
			}
		},
		onLoad() {
		this.loadGoodsConsultList()	
		},
		methods: {
			/**
			 * 加载
			 * **/
			loadGoodsConsultList:function(item){
				api.get({
					url:'User/GetGoodsConsultList',
					data:{
						user_id:this.user.user_id,
						page:1,
						pagesize:30,
						},
					success:data=>{
						console.info('loadGoodsConsultList'+JSON.stringify(data))
						if(data.ErrCode==0){
							this.goodsConsultList = data.Response
						}
					}
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	.noData{
		margin-top: 20upx;
	}
	.noData>text:nth-child(2){
		font-size: 26upx;
		margin-left: 15upx;
			color: #999999;
	}
	.noData>text:nth-child(1){
		color: #999999;
		font-size: 40upx;
	}
	.item2{
		margin-top: 20upx;
	}
	.item2>view>text{
		width: 650upx;
		font-size: 26upx;
		color: #000000;
		margin-left: 20upx;
	}
	.item2>view>view{
		width: 32upx;
			height: 32upx;
			background-color: #ec7535;
			border-radius: 2upx;
			text-align: center;
			line-height: 32upx;
			font-size: 24upx;
			color: #ffffff;
	}
	.item1>view>text{
		font-weight: 500;
		width: 524upx;
		font-size: 28upx;
		color: #333333;
		margin-left: 20upx;
	}
	.item1>view>view{
		width: 32upx;
			height: 32upx;
			background-color: $btn-bground;
			border-radius: 2upx;
			text-align: center;
			line-height: 32upx;
			font-size: 24upx;
			color: #ffffff;
	}
	.list{
		margin-bottom: 20upx;
		background-color: #fff;
		padding: 42upx 30upx 30upx 22upx;
		box-sizing: border-box;
	}

</style>
